<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="fm" uri="http://www.springframework.org/tags/form"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
        <div class="right">
            <div class="location">
                <strong>你现在所在的位置是:</strong>
                <span>用户管理页面</span>
            </div>
			<div class="search">
                <form method="post" action="${pageContext.request.contextPath }/room/list.html">
                    <input name="method" value="query" class="input-text" type="hidden">
                    <span>会议室名称：</span>
                    <input name="queryRoomName" class="input-text" type="text" value="${queryRoomName}">

                    <span>会议室位置：</span>
                    <input name="queryRoomLocation" class="input-text" type="text" value="${queryRoomLocation}">

                    <span>容纳人数：</span>
                    <input name="queryRoomMinNumber" class="input-text" type="text" value="${queryRoomMinNumber}" style="width: 25px">
                    -
                    <input name="queryRoomMaxNumber" class="input-text" type="text" value="${queryRoomMaxNumber}" style="width: 25px">
                    <span>会议室状态：</span>

                    <select name="queryRoomStatus">

                        <option value="-1">--请选择--</option>
                        <option <c:if test="${'1' == queryRoomStatus }">selected="selected"</c:if>
                                value="1">可用</option>
                        <option <c:if test="${'0' == queryRoomStatus }">selected="selected"</c:if>
                                value="0">不可用</option>


                    </select>

                    <input type="hidden" name="pageIndex" value="1"/>
                    <input	value="查 询" type="submit" id="searchbutton">
                    <a href="${pageContext.request.contextPath}/room/add.html" >
                        添加会议室</a>
                </form>
			</div>
			<!--请在此处添加table表格 -->
            <!--用户-->
            <table class="providerTable" cellpadding="0" cellspacing="0">
                <tr class="firstTr">
                    <th width="15%">会议室名称</th>
                    <th width="20%">会议室位置</th>
                    <th width="15%">容纳人数</th>
                    <th width="20%">会议室状态</th>
                    <th width="30%">操作</th>
                </tr>
                <c:forEach var="room" items="${roomList }" varStatus="status">
                    <tr>
                        <td>
                            <span>${room.name }</span>
                        </td>
                        <td>
                            <span>${room.location }</span>
                        </td>
                        <td>
                            <span>${room.number}</span>
                        </td>
                        <td>
                            <c:if test="${room.status == true}">
                                <span>可用</span>
                            </c:if>
                            <c:if test="${room.status == false}">
                                <span>不可用</span>
                            </c:if>
                        </td>
                        <td>
                            <span><a class="viewRoom" href="javascript:;" roomid=${room.id } roomname=${room.name }><img src="${pageContext.request.contextPath }/statics/images/read.png" alt="查看" title="查看"/></a></span>
                            <span><a class="modifyRoom" href="javascript:;" roomid=${room.id } roomname=${room.name }><img src="${pageContext.request.contextPath }/statics/images/xiugai.png" alt="修改" title="修改"/></a></span>
                            <span><a class="deleteRoom" href="javascript:;" roomid=${room.id } roomname=${room.name }><img src="${pageContext.request.contextPath }/statics/images/schu.png" alt="删除" title="删除"/></a></span>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
            <c:import url="/WEB-INF/jsp/common/rollpage.jsp">
                <c:param name="totalCount" value="${totalCount}"/>
                <c:param name="currentPageNo" value="${pageIndex}"/>
                <c:param name="totalPageCount" value="${totalPageCount}"/>
            </c:import>
        </div>
		</div>
    </section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeRoom">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
            <p>你确定要删除该会议室吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>

<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
<!-- 请注意更新JS脚本路径 -->
<script type="text/javascript" 
	src="${pageContext.request.contextPath }/statics/js/roomlist.js"></script>
